<?php

namespace console\controllers;

use common\models\redPacket\RedPacketLog;
use common\models\shop\GoodsOrder;
use common\models\user\UserUnusualLog;
use common\models\userFund\UserWithdrawOrder;
use common\models\userLevel\UserLevelLog;
use console\models\Home;
use yii\console\Controller;

/**
 * 分钟级别的定时任务
 * Class MinutesController
 * @package console\controllers
 */
class MinutesController extends Controller
{
    //Im 红包过期自动清理
    public function actionImBackRedPacket() {
        (new RedPacketLog())->backRedPacket();
    }

    //检测会员到期
    public function actionUserLevelExpire() {
        (new UserLevelLog())->expireLog();

        //封禁用户自动解封
        (new UserUnusualLog())->unblock();
    }

    //商城订单  订单自动完成
    public function actionOrderDone()
    {
        (new GoodsOrder())->updateOrderDone();
    }

    // 查询提现订单
    public function actionQueryWithdraw()
    {
        (new UserWithdrawOrder())->queryWithdraw();
    }

    //商城订单  提醒发货
    public function actionOrderRemindSend()
    {
        (new GoodsOrder())->orderRemindSend();
    }
}